package com.ruicar.afs.cloud.common.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.modules.contract.enums.LendingDirection;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author infinity
 * @version 1.0
 * @date 2020/6/15 15:52
 */
@TableName("voucher_entry")
@Data
public class VoucherEntryVo{
    private Long id;
    @ApiModelProperty("借贷方向")
    @NotNull(message = "借贷方向不能为空")
    private LendingDirection lendingDirection;

    @ApiModelProperty("科目代码")
    @NotBlank(message = "科目代码不能为空")
    private String subjectCode;

    @ApiModelProperty("科目名称")
    @NotBlank(message = "科目名称不能为空")
    private String subjectName;

    @ApiModelProperty("金额表达式")
    private String amountExpression;

    @ApiModelProperty("排序号")
    @NotNull(message = "排序号不能为空")
    private Integer orderNum;

    @ApiModelProperty("摘要")
    @NotBlank(message = "摘要不能为空")
    private String explanation;

    @ApiModelProperty("凭证主表id")
    @NotNull(message = "凭证主表id不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long correlationId;

    @ApiModelProperty("规则编号")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ruleNo ;

}
